package com.peas.platform.module.icims.expenditure.basal.adapter.repository.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;
import javax.validation.constraints.*;

// 账户信息
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_expenditure_account`")
public class ExpenditureAccountPo extends BasePo {

    // 账户类型
    // 枚举取值:ExpenditureAccountType
    @Comment(value = "账户类型", enumType = "ExpenditureAccountType")
    @NotBlank(message = "账户类型不能为空")
    @Size(max = 20, message = "账户类型不能超过20个字符")
    @TableField(value = "`account_type`", jdbcType = JdbcType.VARCHAR)
    private String accountType;

    // 账户编号
    @Comment(value = "账户编号")
    @Size(max = 100, message = "账户编号不能超过100个字符")
    @TableField(value = "`account_code`", jdbcType = JdbcType.VARCHAR)
    private String accountCode;

    // 账户名称
    @Comment(value = "账户名称")
    @NotBlank(message = "账户名称不能为空")
    @Size(max = 200, message = "账户名称不能超过200个字符")
    @TableField(value = "`account_name`", jdbcType = JdbcType.VARCHAR)
    private String accountName;

    // 银行ID
    // （银行表）外键
    @Comment(value = "银行ID")
    @NotNull(message = "银行ID不能为空")
    @TableField(value = "`bank_id`", jdbcType = JdbcType.BIGINT)
    private Long bankId;

    // 账号
    @Comment(value = "账号")
    @NotBlank(message = "账号不能为空")
    @Size(max = 200, message = "账号不能超过200个字符")
    @TableField(value = "`account`", jdbcType = JdbcType.VARCHAR)
    private String account;

    // 状态
    // 枚举取值:CommonEnableDisable
    @Comment(value = "状态", enumType = "CommonEnableDisable")
    @NotBlank(message = "状态不能为空")
    @Size(max = 20, message = "状态不能超过20个字符")
    @TableField(value = "`state`", jdbcType = JdbcType.VARCHAR)
    private String state;

}
